#ifndef CACHEMANAGER_H
#define CACHEMANAGER_H

#include <QObject>
#include "Global/singleton.h"
#include <QMap>
#include "protocol.h"
#include "Global/AbstractCache.h"
class CacheManager : public QObject,public Singleton<CacheManager>
{
    Q_OBJECT
public:
    enum TYPE{
        ERROR=0,
        USER,
    };
    friend class Singleton<CacheManager>;

    std::shared_ptr<AbstractCache> GetCache(myuint Type);

private:
    explicit CacheManager(QObject *parent = nullptr);

    void Register(TYPE Chos);

    QMap<myuint,std::shared_ptr<AbstractCache>>Handler;

signals:

};

#endif // CACHEMANAGER_H
